package com.hiraeth.modules.monitor.model.sd;


import com.fasterxml.jackson.annotation.JsonInclude;
import com.hiraeth.modules.monitor.model.common.BasicAuth;
import com.hiraeth.modules.monitor.model.common.TlsConfig;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * kubernetes 服务发现配置列表
 * @author xuning
 *
 */
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class KubernetesSdConfig implements Serializable {
	
	private static final long serialVersionUID = 8521762501283359561L;
	private String api_server;
	private String role;
	private BasicAuth bac_auth;
	private String bearer_token;
	private String bearer_token_file;
	private String proxy_url;
	private TlsConfig tls_config;
	private List<Namespace> namespaces;
	
	private List<Selectors> selectors;
	
	@Data
	class Namespace {
		private List<String> names;
	}
	
	@Data
	class Selectors {
		/**
		 * endpoints, service, pod, node, or ingress
		 */
		private String role;
		
		private List<String> labels;
		
		private List<String> field;
	}
	

}
